#include "NetMan.h"
#include <vector>
#include <list>
#include <string>

int main(int argc, char *argv[])
{
	TCPMan	ManagerTCP(ConnectionPackFabric, ServerPackFabric);
	if(ManagerTCP.IsWork())
		std::cout<<"Work with network is possible\n";
	else
	{
		std::cout<<"Work with network is unpossible\n";
		return -1;
	}
	
	TCPConnectionPackets* pClient = (TCPConnectionPackets*)ManagerTCP.Connect("localhost", 37569);
	//TCPPacketServer		*pServer = (TCPPacketServer *) ManagerTCP.CreateServer(37569);
	char buffer[512] ;
	while(true)
	{
		std::cin.getline(buffer, 512);
		pClient->SendPack(buffer, strlen(buffer));
		ManagerTCP.Update();						
	}
	return 0;
}

